<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>

<?php
if ($all_gym->count() == 0)
{
	return;
}
else
{
?>

<div class="clearfix" id="main">
  <div id="content">
    <div class="content all_deals">
      <div class="box">
        <div class="box_content">
          <div class="page_content clearfix">
            <div class="one_up last">
              <div class="deal clearfix">
                <div class="distance-tag"> </div>
                <div class="image">
				  <div class="inner"> 
				  <a href="/deal/show/<?php echo $all_gym[0]->id; ?>" title="<?php echo $all_gym[0]->title; ?>"> <img src="<?php echo url::base().'/images/site_images/'.$all_gym[0]->city->zone.'/'.$all_gym[0]->id.'/'.$all_gym[0]->image; ?>" width="426"> </a> 
				  </div>
                </div>
                <div class="info">
                  <div class="title">
                    <div class="price-tag"></div>
                    <a href="/deal/show/<?php echo $all_gym[0]->id; ?>"><?php echo $all_gym[0]->title; ?></a> </div>
                  <div class="location-category"> <?php echo $all_gym[0]->gym_name; ?> </div>
                  <div class="description">
					<?php echo $all_gym[0]->description; ?>
                  </div>
                  <div class="line"></div>
                  <div class="view-deal-button"> <a class="button medium" href="/deal/show/<?php echo $all_gym[0]->id; ?>" title="<?php echo $all_gym[0]->title; ?>">去看看</a> </div>
                </div>
              </div>
            </div>
<?php
	for ($index = 1; $index < $all_gym->count(); $index++)
	{
		if ($index % 3 == 0)
		{
?>
              <div class="three_up last">
<?php
		}
		else
		{
?>
              <div class="three_up">
<?php
		}
?>
              <div class="deal clearfix">
                <div class="distance-tag"> </div>
                <div class="image">
                  <div class="inner"> <a href="/deal/show/<?php echo $all_gym[$index]->id; ?>" title="<?php echo $all_gym[$index]->title; ?>"> <img src="<?php echo url::base().'/images/site_images/'.$all_gym[$index]->city->zone.'/'.$all_gym[$index]->id.'/'.$all_gym[$index]->image; ?>" width="268"> </a> </div>
                </div>
                <div class="info">
                  <div class="title">
                    <div class="price-tag"></div>
                    <a href="/deal/show/<?php echo $all_gym[$index]->id; ?>" title="<?php echo $all_gym[$index]->title; ?>"> <?php echo $all_gym[$index]->title; ?></a> </div>
                  <div class="location-category"> <?php echo $all_gym[$index]->gym_name; ?> </div>
                  <div class="timer">
                    <div class=""> </div>
                  </div>
                  <div class="line"></div>
                  <div class="view-deal-button"> <a class="button small" href="/deal/show/<?php echo $all_gym[$index]->id; ?>" title="<?php echo $all_gym[$index]->title; ?>">去看看</a> </div>
                </div>
              </div>
            </div>
<?php
	}
?>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<?php
}
?>
